package com.ruoyi.department.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.department.mapper.TestDepartmentMapper;
import com.ruoyi.department.domain.TestDepartment;
import com.ruoyi.department.service.ITestDepartmentService;

/**
 * 部门信息Service业务层处理
 * 
 * @author 程序员dd
 * @date 2025-09-04
 */
@Service
public class TestDepartmentServiceImpl implements ITestDepartmentService 
{
    @Autowired
    private TestDepartmentMapper testDepartmentMapper;

    /**
     * 查询部门信息
     * 
     * @param departmentId 部门信息主键
     * @return 部门信息
     */
    @Override
    public TestDepartment selectTestDepartmentByDepartmentId(Long departmentId)
    {
        return testDepartmentMapper.selectTestDepartmentByDepartmentId(departmentId);
    }

    /**
     * 查询部门信息列表
     * 
     * @param testDepartment 部门信息
     * @return 部门信息
     */
    @Override
    public List<TestDepartment> selectTestDepartmentList(TestDepartment testDepartment)
    {
        return testDepartmentMapper.selectTestDepartmentList(testDepartment);
    }

    /**
     * 新增部门信息
     * 
     * @param testDepartment 部门信息
     * @return 结果
     */
    @Override
    public int insertTestDepartment(TestDepartment testDepartment)
    {
        return testDepartmentMapper.insertTestDepartment(testDepartment);
    }

    /**
     * 修改部门信息
     * 
     * @param testDepartment 部门信息
     * @return 结果
     */
    @Override
    public int updateTestDepartment(TestDepartment testDepartment)
    {
        return testDepartmentMapper.updateTestDepartment(testDepartment);
    }

    /**
     * 批量删除部门信息
     * 
     * @param departmentIds 需要删除的部门信息主键
     * @return 结果
     */
    @Override
    public int deleteTestDepartmentByDepartmentIds(Long[] departmentIds)
    {
        return testDepartmentMapper.deleteTestDepartmentByDepartmentIds(departmentIds);
    }

    /**
     * 删除部门信息信息
     * 
     * @param departmentId 部门信息主键
     * @return 结果
     */
    @Override
    public int deleteTestDepartmentByDepartmentId(Long departmentId)
    {
        return testDepartmentMapper.deleteTestDepartmentByDepartmentId(departmentId);
    }
}
